package com.api.ecustom.finance;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;

import com.alibaba.fastjson.JSONObject;

import ecustom.clients.util.JsonUtil;
import ecustom.common.AbstractWebAction;
import ecustom.finance.bean.WorkflowBean;

/**
* @author 作者:Gcc
* @createDate 创建时间：Aug 21, 2023 10:26:41 AM
*/
@Path("/ecustom/workflow")
public class WorkflowAction extends AbstractWebAction {
	
	@Path("/setVoucher")
	@POST
	@Produces(MediaType.APPLICATION_JSON)
	public JSONObject setVoucher(@Context HttpServletRequest req) throws Exception {
		String reqJsonStr = getBody(req);
		List<Map<String, Object>> listVoucher = JsonUtil.listMapFromJson(reqJsonStr);
		return new WorkflowBean().handlVoucher(listVoucher);
	}
	
}
